# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper

  def get_dojo_grid_defaults
    "<script type=\"text/javascript\">
    dojo.require(\"dijit.dijit\"); 
    dojo.require(\"dojox.grid.Grid\"); 
    dojo.require(\"dojox.grid._grid.cell\");
    dojo.require(\"dijit.form.Button\");
    dojo.require(\"dijit.layout.ContentPane\");
    dojo.require(\"dojox.grid._data.model\");
    dojo.require(\"dojo.data.ItemFileWriteStore\"); 
    dojo.require(\"dojo.parser\");
</script>\n"
  end
 
  #Make this dynamic and a hell of a lot smarter
  def get_dojo_grid_css
"<style =\"text/css\">
    @import \"/javascripts//dojox/grid/_grid/tundraGrid.css\";
          body {
              font-size: 0.9em;
              font-family: Geneva, Arial, Helvetica, sans-serif;
          }
          .heading {
              font-weight: bold;
              padding-bottom: 0.05em;
          }
          #grid {
              border: 1px solid #333;
              width: 90em;
              height: 70em;
          };
</style>"
  end

  
  def dojo_container_defaults
    return ""
  end

end
